package com.dong.test;

import com.dong.cjlibproxy.Handler;

public class T100CGLibChain {

    static class HandlerA extends  Handler{

        @Override
        protected void handleProcess() {
            System.out.println("handler a process");
        }
    }
    static class HandlerB extends  Handler{

        @Override
        protected void handleProcess() {
            System.out.println("handler b process");
        }
    }
    static class HandlerC extends  Handler{

        @Override
        protected void handleProcess() {
            System.out.println("handler c process");
        }
    }

    public static void main(String[] args) {
        HandlerA handlerA = new HandlerA();
        HandlerB handlerB = new HandlerB();
        HandlerC handlerC = new HandlerC();
        handlerA.setSuccessor(handlerB);
        handlerB.setSuccessor(handlerC);
        handlerA.handleProcess();

    }
}
